<!-- 用户组织关系对象，组织成员 首页 -->
<template>
  <div class="app-container">
    <!-- 左侧 组织结构树-->
    <el-row :gutter="15">
      <el-col :xs="24" :sm="8" :md="7" :lg="6" style="margin-bottom: 10px">
        <el-card class="box-card" style="height: 100% ">
          <div slot="header" class="clearfix">
            <span>组织列表</span>
          </div>
          <LeftIndex style="padding: 1px" @depChange="depChaged" />
        </el-card>
      </el-col>
      <!-- 右侧 成员列表-->
      <el-col :xs="24" :sm="16" :md="17" :lg="18">
        <el-card class="box-card" style="height: 100%">
          <div slot="header" class="clearfix">
            <span v-if="depId" style="color: #ff4949">【{{ depName }}】：</span><span>成员列表</span>
          </div>
          <div v-if="!depId">
            <div class="my-code">请先选择组织</div>
          </div>
          <div v-else>
            <RightIndex style="padding: 1px" :dep-id="depId" :dep-name="depName"/>
          </div>

        </el-card>
      </el-col>
    </el-row>

  </div>
</template>
<!-- 用户组织关系对象，组织成员 首页 -->
<script>
import LeftIndex from './leftIndex'
import RightIndex from './rightIndex'
export default {
  name: 'SysDepUser',

  components: {
    LeftIndex,
    RightIndex
  },
  data() {
    return {
      depId: null,
      depName: null
      // permission: new Map()
    }
  },
  mounted() {
    // this.permission = this.$store.state.menu.buttonPermission.get('SysUserDep')
  },
  methods: {
    depChaged(depId, depName) {
      this.depId = depId
      this.depName = depName
    }
  }
}
</script>

<style scoped>

</style>
